1. Technical Field
The present invention is generally directed to application servers. More specifically, the present invention is directed to a system, computer program product and method of dynamically adding a server best suited for a cluster of application servers into the cluster during periods of heavy workload.
2. Description of Related Art
An application server is a server on which a process that runs application servlets, JavaServer Pages, and/or Enterprise Java Beans (EJBs) executes. (Note that JavaServer Pages and EJBs are trademarks of Sun Microsystems, Inc.) The application server provides servlet runtime components and an EJB runtime container. An EJB container manages enterprise beans contained therein. The container is responsible for registering objects of a bean, providing a remote interface for the object, creating and destroying object instances, checking security for the object, managing the active state for the object, and coordinating distributed transactions.
An application server may undergo varying amounts of workload within a particular time span. To maintain performance during periods of heavy workloads, an administrator may make additional servers available through clustering. Clustering refers to grouping together a plurality of application servers to provide load balancing and failover support. Each application server in the cluster runs the same set of applications, and a deployment manager manages the whole cluster. To a user, the cluster appears to be a single application server.
One problem with clustering is that during periods of light workload, some of the servers in the cluster may become idle. Consequently, application servers such as WebSphere™ Application Server (WebSphere™ is a registered mark of International Business Machines Corporation (IBM) and WebSphere™ Application Server is a product of IBM) allow administrators to configure the servers in the cluster using policy-based dynamic allocation of resources (CPU, memory, database connections etc.). Policy-based dynamic allocation of resources enables servers that do not require a lot of resources during a particular timeframe to automatically be assigned fewer resources during that timeframe. However, the number of servers in the cluster remains constant.
Other application servers include an auto-discovery feature to allow a cluster to find a replacement server for an unresponsive server when the cluster is under a period of heavy workload. To find the replacement server, a request is sent to a pool of un-configured servers to join the cluster. The first server to respond to the request is used as the replacement server. However, just as in the case of the policy-based dynamic allocation of resources, the number of servers in the cluster remains constant.
Further, the replacement server may not always be a good choice. For example, servers do not perform well under all circumstances. Therefore, there may be circumstances under which the replacement server may not perform the task well. Nonetheless, even if the replacement server is performing the task well, it may not be available for an extended amount of time or may only have a certain number of CPU cycles to spare etc.
Thus, what is needed are a system, computer program product and method of dynamically adding a server into a cluster during periods of heavy workload. The added server, however, should be one that is best suited among any number of available servers to handle the workload.